package com.service.order.controller;


import com.service.order.service.PayLogService;
import com.service.utils.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 支付日志表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-10-12
 */
@RestController
@RequestMapping("payLog")
@Api(description = "支付管理")
public class PayLogController {

    @Autowired
    private PayLogService payLogService;

    @GetMapping("createCode/{orderId}")
    @ApiOperation("根据订单id,生成微信支付二维码")
    public ResultVo createCode(@PathVariable String orderId){
        Map<String,Object> map =  payLogService.createCode(orderId);
        return ResultVo.ok().data(map);
    }

}

